#ifndef  __GPS_H
#define  __GPS_H

//----------------------------------Include-------------------------------------
#include  <stdint.h>
//------------------------------------------------------------------------------

//-----------------------------------Macro--------------------------------------
#define  GPS_NO_ERR                    (0)
#define  GPS_ERR_COMM                  (1)
#define  GPS_ERR_LOC                   (2)
//------------------------------------------------------------------------------

//------------------------------------Type--------------------------------------
typedef struct{
   int32_t   lat;
   int32_t   lon;
  uint16_t   err;
  uint16_t   done;
}t_gps;

typedef struct {
  char  time[10+2];
  char  latitude[10+1];
  char  NS;
  char  EW;
  char  longitude[11+1];
  char  valid;
  float hdop;
  float altitude;
}t_gga;
//------------------------------------------------------------------------------

//---------------------------------Share Var------------------------------------
#ifdef  GPS_GLOBALS
#else
extern t_gps                   gt_gps;
extern t_gga                   gt_gga;
extern uint32_t                gu32_gps_reloc;
#endif
//------------------------------------------------------------------------------

//--------------------------------Extern Func-----------------------------------
//------------------------------------------------------------------------------

//----------------------------------Declare-------------------------------------
void     it_gps_rcv_one_byte(unsigned char c);
void     it_gps_rcv_done(void);
//------------------------------------------------------------------------------
void     gps_reset(void);
void     gps_init(void);
void     gps_close(void);
void     gps_cyc(void);
//------------------------------------------------------------------------------

#endif
//------------------------------------EOF---------------------------------------








